import request from '@/utils/request'

/**
 * 获取用户列表数据
 */
export const getUserListAPI = () => {
  return request({
    url: '/company/department'
  })
}

/**
 * 获取删除接口API
 *
 */
export const deleteListAPI = (id) => {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}

/**
 * 新增-部门
 */
export const AddListAPI = (data) => {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}

/**
 * 获取获取-部门详情
 */
export const getMenageAPI = (id) => {
  return request({
    url: `/company/department/${id}`
  })
}

/**
 * 修改部门
 */
export const updataListAPI = (data) => {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data: data
  })
}
